{% load static %}
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>修改用户</title>

    <!-- Bootstrap core CSS -->
    <link rel="icon" href="{% static 'favicon.ico' %}">
    <link href="{% static 'bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
    <link rel="stylesheet" href="{% static 'fontawesome/css/font-awesome.min.css' %}">
</head>
<body>
    <div class="media">
        <div class="media-left">
            <a href="#">
                <img src="/upload/{{img}}" alt="头像" class="media-object img-circle" style="width:200px; height:200px">
            </a>
        </div>
        <div class="media-body">
            <h4 class="media-heading">账号信息</h4>
            <form action="" method="post" enctype="multipart/form-data" class="form-horizontal">
                            {% csrf_token %}
                            {{form_obj.id}}
                            <div class="form-group">
                                <label for="{{form_obj.name.id_for_label}}" class="col-md-2 control-label">
                                    {{form_obj.name.label}}
                                </label>
                                <div class="col-md-8">
                                    {{form_obj.name}}
                                    <span class="help-block">{{form_obj.name.errors.0}}</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="{{form_obj.password.id_for_label}}" class="col-md-2 control-label">
                                    {{form_obj.password.label}}
                                </label>
                                <div class="col-md-8">
                                    {{form_obj.password}}
                                    <span class="help-block">{{form_obj.password.errors.0}}</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="{{form_obj.email.id_for_label}}" class="col-md-2 control-label">
                                    {{form_obj.email.label}}
                                </label>
                                <div class="col-md-8">
                                    {{form_obj.email}}
                                    <span class="help-block">{{form_obj.email.errors.0}}</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="{{form_obj.gender.id_for_label}}" class="col-md-2 control-label">
                                    {{form_obj.gender.label}}
                                </label>
                                <div class="col-md-8">
                                    {{form_obj.gender}}
                                    <span class="help-block">{{form_obj.gender.errors.0}}</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="{{form_obj.hobby.id_for_label}}" class="col-md-2 control-label">
                                    {{form_obj.hobby.label}}
                                </label>
                                <div class="col-md-8">
                                    {{form_obj.hobby}}
                                    <span class="help-block">{{form_obj.hobby.errors.0}}</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="{{form_obj.hair.id_for_label}}" class="col-md-2 control-label">
                                    {{form_obj.hair.label}}
                                </label>
                                <div class="col-md-8">
                                    {{form_obj.hair}}
                                    <span class="help-block">{{form_obj.hair.errors.0}}</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="{{form_obj.img.id_for_label}}" class="col-md-2 control-label">
                                    {{form_obj.img.label}}
                                </label>
                                <div class="col-md-8">
                                    {{form_obj.img}}
                                    <span class="help-block">{{form_obj.img.errors.0}}</span>
                                </div>
                            </div>

                <input type="hidden" name="img1" id="img1" value="{{img}}">
                <div align="center">
                    <input type="submit" class="btn btn-primary" value="保存">
                </div>
            </form>
        </div>
    </div>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="{% static 'jquery-3.3.1.min.js' %}"></script>
    <script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
</body>
</html>